package cn.jilian.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import cn.jilian.entity.Auth;

public interface AuthDAO extends JpaRepository<Auth, Long> {
	
	@Query(value="select max(seq) as max from Auth where fid=?1 and rank=?2")
	Integer getMaxSeq(Long fid,Integer rank);

	Auth findByUsername(String username);
	
	void deleteByFid(Long fid);
}
